
if (GetLocale() == "zhCN") then
	BF_ACTION_BUTTON_TITLE = {"冷却监控", "lengquejiankong"};
	BFCD_COOLDOWN_COUNT = "显示详细的冷却时间";
	BFCD_COOLDOWN_SHOW_TARGET = "显示小图标的冷却时间";
	BFCD_COOLDOWN_SHAMAN_CD = "显示萨满图腾持续时间";
	BFCD_COOLDOWN_DK_CD = "显示死骑符文冷却时间";
	BFCD_SHINE_TYPE_TITLE = "闪光类型：";
	BFCD_SHINE_TYPE = {"标准","图标", "大闪光", "雷达","收缩"};
	BFCD_COOLDOWN_SHOW_MIDDLE = "中央显示冷却提示";
	BFCD_COOLDOWN_SHOW_SOUND = "播放冷却提示声音";	
	BFCD_COOLDOWN_SHOW_BAR = "显示冷却计时条";

elseif (GetLocale() == "zhTW") then
	BF_ACTION_BUTTON_TITLE = {"冷卻監控", "lengquejiankong"};
	BFCD_COOLDOWN_COUNT = "顯示詳細的冷卻時間";
	BFCD_COOLDOWN_SHOW_TARGET = "顯示小圖示的冷卻時間";
	BFCD_COOLDOWN_SHAMAN_CD = "顯示薩滿圖騰持續時間";
	BFCD_COOLDOWN_DK_CD = "顯示死騎符文冷卻時間";
	BFCD_SHINE_TYPE_TITLE = "閃光類型：";
	BFCD_SHINE_TYPE = {"標準", "圖標","大閃光", "雷達","收縮"};
	BFCD_COOLDOWN_SHOW_MIDDLE = "中央顯示冷卻提示";
	BFCD_COOLDOWN_SHOW_SOUND = "播放冷卻提示聲音";	
	BFCD_COOLDOWN_SHOW_BAR = "顯示冷卻計時條";
else
	BF_ACTION_BUTTON_TITLE = "CoolDown Monitor";
	BFCD_COOLDOWN_COUNT = "Show detail of cooldown";
	BFCD_COOLDOWN_SHOW_TARGET = "Show small icon cooldown";
	BFCD_COOLDOWN_SHAMAN_CD = "Show Totem remaining time";
	BFCD_COOLDOWN_DK_CD = "Show Rune Cool down";
	BFCD_SHINE_TYPE_TITLE = "Shine type:";
	BFCD_SHINE_TYPE = {"Standard", "Icon","Big Shine", "Radar","Collapse"};
	BFCD_COOLDOWN_SHOW_MIDDLE = "Show Cooldown at Center";
	BFCD_COOLDOWN_SHOW_SOUND = "Play Sound When Cooldown";	
	BFCD_COOLDOWN_SHOW_BAR = "Display Cooldown Bar";
end

function BFCooldown_LoadMenu()
	ModManagement_RegisterMod(
		"ActionButton",
		"Interface\\Icons\\inv_trinket_naxxramas06",
		BF_ACTION_BUTTON_TITLE,
		"",
		nil,
		nil,
		{[2]=true,[3]=true}

	);


	ModManagement_RegisterCheckBox(
		"ActionButton",
		BFCD_COOLDOWN_COUNT,
		nil,
		"EnableCooldownCount2",
		0,
		function (arg)
			if (arg == 1) then
				if BFCooldown then
					BFCooldown:ToggleSec(true,"ACTION");
				end
			else
				if BFCooldown then
					BFCooldown:ToggleSec(false,"ACTION");
				end
			end
		end
	);

	ModManagement_RegisterSpinBox(
		"ActionButton",
		BFCD_SHINE_TYPE_TITLE,
		nil,
		"ShineType",
		"list",
		BFCD_SHINE_TYPE,
		BFCD_SHINE_TYPE[1],
		function (arg)
			if arg and BFCooldown then
				for _i,_val in pairs(BFCD_SHINE_TYPE) do
					if _val == arg then
						BFCooldown:SwitchActionStyle(_i-2);
						return
					end
				end
			end
		end,
		1
	);

	ModManagement_RegisterCheckBox(
		"ActionButton",
		BFCD_COOLDOWN_SHOW_TARGET,
		nil,
		"ShowTargetCooldown2",
		0,
		function (arg)
			if (arg == 1) then
				if BFCooldown then
					BFCooldown:ToggleSec(true,"BUFF")
				end
			else
				if BFCooldown then
					BFCooldown:ToggleSec(false,"BUFF")
				end
			end
		end,
		1
	);
	if select(2,UnitClass('player') )=='SHAMAN' then
		ModManagement_RegisterCheckBox(
			"ActionButton",
			BFCD_COOLDOWN_SHAMAN_CD,
			nil,
			"ShowTotem",
			0,
			function (arg)
				if (arg == 1) then
					if BFCooldown then
						BFCooldown:ToggleSpecial(true)
					end
				else
					if BFCooldown then
						BFCooldown:ToggleSpecial(false)
					end
				end
			end,
			1
		);
	end
	
	if select(2,UnitClass('player') )=='DEATHKNIGHT' then
		ModManagement_RegisterCheckBox(
			"ActionButton",
			BFCD_COOLDOWN_DK_CD,
			nil,
			"ShowRune",
			0,
			function (arg)
				if (arg == 1) then
					if BFCooldown then
						BFCooldown:ToggleSpecial(true)
					end
				else
					if BFCooldown then
						BFCooldown:ToggleSpecial(false)
					end
				end
			end,
			1
		);
	end
	ModManagement_RegisterCheckBox(
		"ActionButton",
		BFCD_COOLDOWN_SHOW_MIDDLE,
		nil,
		"ShowCenter",
		0,
		function (arg)
			if (arg == 1) then
				if BFCooldown then
					BFCooldown:ToggleMiddle(true)
				end
			else
				if BFCooldown then
					BFCooldown:ToggleMiddle(false)
				end
			end
		end
	)
	
	ModManagement_RegisterCheckBox(
		"ActionButton",
		BFCD_COOLDOWN_SHOW_SOUND,
		nil,
		"PlaySound",
		0,
		function (arg)
			if (arg == 1) then
				if BFCooldown then
					BFCooldown:ToggleSound(true)
				end
			else
				if BFCooldown then
					BFCooldown:ToggleSound(false)
				end
			end
		end
	)
	
	ModManagement_RegisterCheckBox(
		"ActionButton",
		BFCD_COOLDOWN_SHOW_BAR,
		nil,
		"ToggleBar",
		0,
		function (arg)
			if (arg == 1) then
				if BFCooldown then
					BFCooldown:ToggleBar(true)
				end
			else
				if BFCooldown then
					BFCooldown:ToggleBar(false)
				end
			end
		end
	)
end
